- Maximum one's
- 03 April, 2026: 00.09.36 ✔
- Apply binary search on inner loop
- Initial max row is
0 and value is 0
- Search in 2D matrix
- 03 April, 2026: 00.05.37 ✔
- Divide by appropriate size
- Row Column Wise Sorted Matrix
- 03 April, 2026: 00.24.26 ❌
- Failed at edge cases
- Compare the row/column iterator with appropriate size(require both
m and n)
- Think which corner should be the starting point
- One iterator should move to smaller value
- Another iterator should move to larger value
- Peak Element II
- 04 April, 2026: 00.34.52 ❌
- Failed at implementation
- Fist index of array is used to iterate top-down, second index is used to iterate left-right.
- Find the max item(row) in
mids column
- Compare it with its neighbors(left, right)
- Don't need top, bottom as it is already compared duting max extraction
- If condition pass, return the answer, if not then narrow down the search space
- Matrix Median
- 04 April, 2026: 00.24.57 ❌
- Failed at implementation
max_element(mat.begin(), mat.end()) can't extract maximum from 2d array. Extract it by row wise sorted property
low, high is comes from the value of matrix
- Extract the desired median position
- Different number of item is used from each row to calculate the median
- This are the item used to count median
- For each
mid, check how many item appear before it